<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Wizard.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<PackageDescriptor>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.RenderPartial("WizardHeader"); %>
    <%
        using (Html.BeginForm())
        { %>
    <%:Html.AntiForgeryToken()%>
    <h1>
        Select a template to deploy</h1>
    <table cellspacing="5">

        <% 
            int i = 0; 
            foreach (var p in Model)
           {
        %>
        <tr>
            <td>
                <input type="radio" name="Package" value="<%:p.Name %>" checked="<%:i==0 ? "checked" : "" %>" />
            </td>
            <td style="width: 300px; height: 200px;">
                <% if (!string.IsNullOrEmpty(p.ImageUrl))
                   { %>
                <img src="<%:Url.Action("ZipFile","Installation",new {file=p.ImageUrl,package="/public/"+p.Name}) %>"
                    alt="" />
                <%} %>
            </td>
            <td valign="top">
                <% Html.RenderPartial("PackageDetail", p); i++; %>
            </td>
        </tr>
        <%} %>
    </table>
    <div style="margin-top: 10px; padding: 10px;" class="ui-widget-content ui-border-top">
        <%:Ajax.Submit(HttpContext.GetGlobalResourceObject("language", "RES_NEXT") as string)%>
    </div>
    <%} %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
